/*
 * Copyright：fxsen <br/>
 * Date: 2022/1/19 19:17 <br/>
 * Email:fxsen@foxmail.com
 * Author: fxsen
 */
package com.fxsen.commons.sysmanager.core.mapper;

import com.fxsen.commons.core.base.common.mapper.CommonMapper;
import com.fxsen.commons.sysmanager.core.entity.Permission;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Set;

/**
 * @describe: 系统权限数据访问层
 * @date: 2022/1/19 19:17
 * @author: fxsen
 */
@Mapper
@Repository
public interface PermissionMapper extends CommonMapper<Permission> {
    List<Permission> findByPid(String pid);
    /**
     * 按用户 ID 查找权限标记
     * @param userId  用户id
     * @return {@link Set}
     * @date 2022/1/24 15:41
     * @author fxsen
     **/
    Set<String> findPermissionTagByUserId(String userId);

    Permission findByTagAndUserId(String tag,String userId);
}
